<?php
include 'recharge/abstract.php';
/**
 * 向摩卡游戏充值
 * @author Kerry
 *
 */
class Recharge_Moka extends Recharge_Abstract
{
	/**
	 * 
	 * 游戏充值成功状态
	 * 
	 * **/
	const GAME_RECHARGE_STATUS_SUCCESS = 'SUCCESS';
	
   /**
	 * @author Kerry
	 * @param array $result
	 * @return boole
	 * **/
	
	public function checkGameRechargeSuccess($result)
	{
	    return $result == self::GAME_RECHARGE_STATUS_SUCCESS ? true :false;
	}
	
    /**
     * 
     * 请求变量
     * 
     * **/
	protected function _makeParams($userId, $serverId, $amount, $roleId = '')
	{
		$params = array(
			'amount'=>$amount,
			'Userid'=>$userId,
			'Note'=>$roleId,
			'serverid'=>$serverId,
		);
		return $params;
	}
	//生成签名
	protected function _makeSign($params)
	{
		ksort($params);
		$queryString = $this->buildQuery($params);
		return md5($queryString);
	}	
}